<template>
	<view>

		<view style="width: 100%;height: 100%;display: flex;">
			<view style="padding-bottom: 15px;width: 100%;">
				<view v-if="deviceId == ''"
					style="display: flex;justify-content: center;align-items: center;height: 80vh;flex-direction: column;">
					<image src="../../static/base_ic_no_device.png"
						style="width: 200px;height: 200px;margin-bottom: 10px;">
					</image>
					您还未连接任何设备
				</view>

				<view style="padding: 15px 20px 0px 20px;" v-for="(item,index) in listArr">
					<view style="display: flex;width: 100%;align-items: center;">
						<text style="color: #333333;font-size: 14.5px;white-space: pre-wrap;">{{item.name}}</text>

						<view class="value" v-if="item.name == '工作模式'">
							<text :style="{'color': item.value.substring(0,4) == '调试模式'? '#ff0000':'#999999'}">{{item.value.substring(0,4)}}</text>
							<text style="color: #999999;">{{item.value.substring(4,item.value.length)}}</text>
						</view>

						<view class="value" v-else-if="item.name == '水位测值'">
							<text style="color: #999999;">{{item.value.substring(0,item.value.length-2)}}</text>
							<text :style="{'color': item.value.substring(item.value.length-2,item.value.length) == '无效'? '#ff0000':'#999999'}">{{item.value.substring(item.value.length-2,item.value.length)}}</text>
						</view>

						<view class="value" v-else-if="item.name == '探头状态'">
							<text style="color: #999999;">{{item.value.split('  ')[0]+'  '}}</text>
							<text :style="{'color':'[O]脱线/[B]卡线/[S]粘线'.indexOf(item.value.split('  ')[1]) != -1? '#ff0000':'#999999'}">{{item.value.split('  ')[1]+'  '}}</text>
							<text style="color: #999999;">{{item.value.split('  ')[2]+'  '}}</text>
							<text :style="{'color': item.value.split('  ')[3] == '异常'? '#ff0000':'#999999'}">{{item.value.split('  ')[3]}}</text>
						</view>

						<view class="value"
							v-else-if="item.name == '    链路1' || item.name == '    链路2' || item.name == '    链路3'">
							<text v-if="item.value.split('  ').length >= 2" style="color: #999999;">{{item.value.split('  ')[1]+'  '}}</text>
							<text v-if="item.value.split('  ').length >= 3" style="color: #999999;">{{item.value.split('  ')[2]+'  '}}</text>
							<text v-if="item.value.split('  ').length >= 4" style="color: #999999;">{{item.value.split('  ')[3]+'  '}}</text>
							<text v-if="item.value.split('  ').length >= 5" :style="{'color': item.value.split('  ')[4] == '异常'? '#ff0000':'#999999'}">{{item.value.split('  ')[4]+'  '}}</text>
							<text v-if="item.value.split('  ').length >= 6" style="color: #999999;">{{item.value.split('  ')[5]}}</text>
							<text v-if="item.value.split('  ').length >= 7" style="color: #999999;">{{item.value.split('  ')[6]}}</text>
						</view>
						
						<view class="value" v-else-if="item.name == '数据存储'">
							<text :style="{'color': item.value.substring(0,2) == '异常'? '#ff0000':'#999999'}">{{item.value.substring(0,2)}}</text>
							<text style="color: #999999;">{{item.value.substring(2,item.value.length)}}</text>
						</view>
						
						<text v-else
							style="font-size: 12.5px;margin-left: 15px;white-space: pre-wrap;color: #999999;">{{item.value}}</text>
					</view>
					<view v-if="item.isLine"
						style="width: 100%;height: 1px;background-color: #48707070;margin-top: 15px;">
					</view>
				</view>


				<demo-block v-if="show" title="设备信息" class="block">

					<l-painter class="l-content" css="width: 750rpx; background: #ffffff" @fail="fail" @done="done"
						pathType="url" ref="poster" performance>

						<l-painter-view css="padding: 5px 10px 0px 10px;" v-for="(item,index) in listArr">
							<l-painter-view css="display: flex;width: 100%;align-items: center;">
								<l-painter-text :text="item.name"
									css="color: #333333;font-size: 14.5px;white-space: pre-wrap;" />
								
								<l-painter-view css="display: flex;font-size: 12.5px;margin-left: 15px;white-space: pre-wrap;" v-if="item.name == '工作模式'">
									<l-painter-text :css="{'color': item.value.substring(0,4) == '调试模式'? '#ff0000':'#999999'}" :text="item.value.substring(0,4)"></l-painter-text>
									<l-painter-text css="color: #999999;" :text="item.value.substring(4,item.value.length)"></l-painter-text>
								</l-painter-view>
								
								<l-painter-view css="display: flex;font-size: 12.5px;margin-left: 15px;white-space: pre-wrap;" v-else-if="item.name == '水位测值'">
									<l-painter-text css="color: #999999;" :text="item.value.substring(0,item.value.length-2)"></l-painter-text>
									<l-painter-text :css="{'color': item.value.substring(item.value.length-2,item.value.length) == '无效'? '#ff0000':'#999999'}" :text="item.value.substring(item.value.length-2,item.value.length)"></l-painter-text>
								</l-painter-view>
								
								<l-painter-view css="display: flex;font-size: 12.5px;margin-left: 15px;white-space: pre-wrap;" v-else-if="item.name == '探头状态'">
									<l-painter-text css="color: #999999;" :text="item.value.split('  ')[0]+'  '"></l-painter-text>
									<l-painter-text :css="{'color':'[O]脱线/[B]卡线/[S]粘线'.indexOf(item.value.split('  ')[1]) != -1? '#ff0000':'#999999'}" :text="item.value.split('  ')[1]+'  '"></l-painter-text>
									<l-painter-text css="color: #999999;" :text="item.value.split('  ')[2]+'  '"></l-painter-text>
									<l-painter-text :css="{'color':item.value.split('  ')[3] == '异常'? '#ff0000':'#999999'}" :text="item.value.split('  ')[3]"></l-painter-text>
								</l-painter-view>
								
								<l-painter-view css="display: flex;font-size: 12.5px;margin-left: 15px;white-space: pre-wrap;"
									v-else-if="item.name == '    链路1' || item.name == '    链路2' || item.name == '    链路3'">
									<l-painter-text v-if="item.value.split('  ').length >= 2" css="color: #999999;" :text="item.value.split('  ')[1]+'  '"></l-painter-text>
									<l-painter-text v-if="item.value.split('  ').length >= 3" css="color: #999999;" :text="item.value.split('  ')[2]+'  '"></l-painter-text>
									<l-painter-text v-if="item.value.split('  ').length >= 4" css="color: #999999;" :text="item.value.split('  ')[3]+'  '"></l-painter-text>
									<l-painter-text v-if="item.value.split('  ').length >= 5" :css="{'color': item.value.split('  ')[4] == '异常'? '#ff0000':'#999999'}" :text="item.value.split('  ')[4]+'  '"></l-painter-text>
									<l-painter-text v-if="item.value.split('  ').length >= 6" css="color: #999999;" :text="item.value.split('  ')[5]"></l-painter-text>
									<l-painter-text v-if="item.value.split('  ').length >= 7" css="color: #999999;" :text="item.value.split('  ')[6]"></l-painter-text>
								</l-painter-view>
								
								<l-painter-view css="display: flex;font-size: 12.5px;margin-left: 15px;white-space: pre-wrap;" v-else-if="item.name == '数据存储'">
									<l-painter-text :css="{'color': item.value.substring(0,2) == '异常'? '#ff0000':'#999999'}" :text="item.value.substring(0,2)"></l-painter-text>
									<l-painter-text css="color: #999999;" :text="item.value.substring(2,item.value.length)"></l-painter-text>
								</l-painter-view>
								
								<l-painter-text v-else :text="item.value"
									css="color: #999999;font-size: 12.5px;margin-left: 15px;white-space: pre-wrap;" />
							</l-painter-view>
							<l-painter-view v-if="item.isLine"
								css="width: 100%;height: 1px;background-color: #48707070;">
							</l-painter-view>
						</l-painter-view>

					</l-painter>

				</demo-block>

				<button v-if="listArr.length > 0" type="button" class="btn-primary" @tap="save">保存</button>
				<suspended></suspended>

			</view>
		</view>
	</view>
</template>

<script>
	import {
		EnquirieswriteBLECharacteristicValue,
		hexCharCodeToStr,
		ab2hex,
		result1,
		result2,
		result3,
		result4,
		getOnOff,
		getTongXin,
		getType,
		getZhuangtai
	} from '../../comment/dataUtils.js'
	export default {

		data() {
			return {

				deviceId: '',
				sendDataName: '',
				listArr: [],
				time: 100,
				timer: 0,
				youxian1: '',
				youxian2: '',
				youxian3: '',
				wuxian1: '',
				wuxian2: '',
				wuxian3: '',
				wuxian4: '',

				picture: '',
				picture2: '',
				show: false,
				"poster": {},

				resultList: [],

				timeout: null,
				
			}
		},

		onLoad(e) {
			// var that = this
			// that.deviceId = getApp().globalData.deviceId

			console.log('onLoad', this.deviceId)
		},


		onShow() {
			var that = this
			that.deviceId = getApp().globalData.deviceId
			console.log('99999999999999', that.deviceId)
			that.SID()
			EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.SID)

			if (that.deviceId != '') {
				this.timer = setInterval(() => {
					console.log('88888888888888', that.deviceId)
					if (that.resultList.length == 0) {
						that.SID()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.SID)
					} else {
						that.Enquirieswrite()
						if (that.timer) { //注销定时器
							console.log('注销定时器timer')
							clearInterval(that.timer)
							that.timer = null;
						}
					}
				}, 500)
			}
		},

		onUnload() {
			var that = this
			//that.sendDataName = ''
			console.log('onUnload')
		},

		onHide() {
			var that = this
			if (that.timeout) { //注销定时器
				console.log('注销定时器timeout')
				clearTimeout(that.timeout)
				that.timeout = null;
			}

			console.log('onHide')
			that.sendDataName = ''
			that.listArr = []
			that.resultList = []
			that.show = false
			if (this.timer) { //注销定时器
				console.log('注销定时器timer')
				clearInterval(this.timer)
				this.timer = null;
			}
		},

		methods: {

			Enquirieswrite() {
				var that = this

				this.timeout = setTimeout(() => {
					EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.VER)
					this.timeout = setTimeout(() => {
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.MOD)
						this.timeout = setTimeout(() => {
							EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.GTC)
							this.timeout = setTimeout(() => {	
								EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.WLV)
								this.timeout = setTimeout(() => {
									EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.SEN)
									this.timeout = setTimeout(() => {
										EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.CSN)
										this.timeout = setTimeout(() => {
											EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.LTE)
											this.timeout = setTimeout(() => {
												EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.ETH)
												this.timeout = setTimeout(() => {
													EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.WLL)
													this.timeout = setTimeout(() => {
														EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.WDL)
														this.timeout = setTimeout(() => {
															EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.IPC)
															this.timeout = setTimeout(() => {
																EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.RTC)
																this.timeout = setTimeout(() => {
																	EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.BAT)
																	this.timeout = setTimeout(() => {
																		EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.TRH)
																		this.timeout = setTimeout(() => {
																			EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.TSN)
																			this.timeout = setTimeout(() => {
																				EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.WLR)
																				this.timeout = setTimeout(() => {
																					EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.WLC)
																					this.timeout = setTimeout(() => {
																						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.DLV)
																						this.timeout = setTimeout(() => {
																							EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.UMC)
																							this.timeout = setTimeout(() => {
																								EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.AMT)
																								this.timeout = setTimeout(() => {
																									EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.BTC)
																									this.timeout = setTimeout(() => {
																										EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.CTC)
																										this.timeout = setTimeout(() => {
																											EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.CSQ)
																											this.timeout = setTimeout(() => {
																												EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.SIM)
																												this.timeout = setTimeout(() => {
																													EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.EXM)
																													this.timeout = setTimeout(() => {
																														EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.SDS)
																														this.timeout = setTimeout(() => {
																															EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.DRA)
																															this.timeout = setTimeout(() => {
																																EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.DRS)
																																this.timeout = setTimeout(() => {
																																	EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.SPA)
																																	this.timeout = setTimeout(() => {
																																		EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.SPS)
																																	}, that.time)
																																}, that.time)
																															}, that.time)
																														}, that.time)
																													}, that.time)
																												}, that.time)
																											}, that.time)
																										}, that.time)
																									}, that.time)
																								}, that.time)
																							}, that.time)
																						}, that.time)
																					}, that.time)
																				}, that.time)
																			}, that.time)
																		}, that.time)
																	}, that.time)
																}, that.time)
															}, that.time)
														}, that.time)	
													}, that.time)
												}, that.time)
											}, 800)
										},that.time)
									}, 800)
								}, that.time)
							}, that.time)
						}, that.time)
					}, that.time)
				}, that.time)
			},

			close() {
				this.show = false
			},
			fail(v) {
				console.log(v)
			},
			done(v) {
				console.log('绘制完成:')
			},
			save() {
				var that = this
				this.show = true
				console.log('绘制完成:==========', this.listArr)
				setTimeout(function() {
					that.$refs.poster.canvasToTempFilePathSync({
						fileType: 'jpg',
						quality: 1,
						success: (res) => {
							console.log(res.tempFilePath)
							uni.saveImageToPhotosAlbum({
								filePath: res.tempFilePath,
								success(res) {
									uni.showToast({
										title: '已保存到相册',
										icon: 'success',
										duration: 2000
									});

									that.show = false
								},
							});
						},
						fail(e) {
							console.log('???????????', e)

							that.show = false
						}
					})
				}, 1000)
			},

			getListArr() {
				var that = this

				for (let i = 0; i < that.resultList.length; i++) {
					// let num=0;
					for (let j = i + 1; j < that.resultList.length; j++) {
						if (that.resultList[i] == that.resultList[j]) {
							that.resultList.splice(j, 1)
						}
					}
				}


				console.log('设备信息===========', that.listArr)
				
				that.resultList.forEach(result => {
					if (result.indexOf(getApp().globalData.writeMsg.SID) != -1) {

						that.listArr = []
						that.listArr.push({
							name: '设备编号',
							value: result1(result), 
							isLine: true,
							isRed: false
						})
					} else if (result.indexOf(getApp().globalData.writeMsg.VER) != -1) {
						that.listArr.forEach((item, index) => {
							if (item.name != '设备编号') {
								that.listArr.splice(index, 1)
							}
						})
						that.listArr.push({
							name: '固件版本',
							value: result1(result), 
							isLine: true,
							isRed: false
						})
					} else if (result.indexOf(getApp().globalData.writeMsg.MOD) != -1) {
						that.listArr.forEach((item, index) => {
							if (item.name != '设备编号' && item.name != '固件版本') {
								that.listArr.splice(index, 1)
							}
						})
						that.listArr.push({
							name: '工作模式',
							value: getType(result1(result)) + '模式  ',
							isLine: true,
							isRed: true
						})
					} else if (result.indexOf(getApp().globalData.writeMsg.GTC) != -1) {
						that.listArr.forEach((item, index) => {
							if (item.name != '设备编号' && item.name != '固件版本' && item.name != '工作模式') {
								that.listArr.splice(index, 1)
							}
						})

						that.listArr.forEach((item, index) => {

							switch (item.name) {
								case '工作模式':
									item.value = item.value + '    采样间隔  ' + result1(result) + '秒'
									break;
								default:
									break;
							}
						})
					} else if (result.indexOf(getApp().globalData.writeMsg.WLV) != -1) {
						that.listArr.forEach((item, index) => {
							if (item.name != '设备编号' && item.name != '固件版本' && item.name != '工作模式') {
								that.listArr.splice(index, 1)
							}
						})
						that.listArr.push({
							name: '水位测值',
							value: result1(result) + '米   ' + getTongXin(result2(result)),
							isLine: true,
							isRed: true
						})
					} else if (result.indexOf(getApp().globalData.writeMsg.SEN) != -1) {
						that.listArr.forEach((item, index) => {
							if (item.name != '设备编号' && item.name != '固件版本' && item.name != '工作模式' &&
								item
								.name != '水位测值') {
								that.listArr.splice(index, 1)
							}
						})
						let cedian = ''
						switch (result3(result)) {
							case 'O':
								cedian = '正常'
								break
							case 'E':
							case 'F':
							case 'G':
								cedian = '异常'
								break
						}
						that.listArr.push({
							name: '探头状态',
							value: '检测' + result1(result) + '  ' + getZhuangtai(result2(
									result)) + '  ' +
								'测点' + '  ' +
								cedian,
							isLine: true,
							isRed: true
						})
					} else if (result.indexOf(getApp().globalData.writeMsg.CSN) != -1) {
						that.listArr.forEach((item, index) => {
							if (item.name != '设备编号' && item.name != '固件版本' && item.name != '工作模式' &&
								item
								.name != '水位测值' && item.name != '探头状态') {
								that.listArr.splice(index, 1)
							}
						})
						var split = result.split(";")

						that.listArr.push({
							name: '中心站号',
							value: ' [1]-' + result1(split[0]) + '  [2]-' + result1(split[1]) +
								'  [3]-' +
								result1(split[2]) + '  [4]-' + result1(split[3]),
							isLine: true,
							isRed: false
						})
					} else if (result.indexOf(getApp().globalData.writeMsg.LTE) != -1) {
						that.listArr.forEach((item, index) => {
							if (item.name != '设备编号' && item.name != '固件版本' && item.name != '工作模式' &&
								item
								.name != '水位测值' && item.name != '探头状态' && item.name != '中心站号') {
								that.listArr.splice(index, 1)
							}
						})
						var split = result.split(";")
						that.listArr.push({
							name: '无线通信',
							value: '',
							isLine: false,
							isRed: false
						})
						that.listArr.push({
							name: '    链路1',
							value: '  ' + getOnOff(result1(split[0])) + '  ' + result2(split[0]) +
								'  ' +
								result3(split[0]) + '  ' + that.wuxian1 + '  ' + result4(split[0]),
							isLine: false,
							isRed: false
						})
						that.listArr.push({
							name: '    链路2',
							value: '  ' + getOnOff(result1(split[1])) + '  ' + result2(split[1]) +
								'  ' +
								result3(split[1]) + '  ' + that.wuxian2 + '  ' + result4(split[1]),
							isLine: false,
							isRed: false
						})
						that.listArr.push({
							name: '    链路3',
							value: '  ' + getOnOff(result1(split[2])) + '  ' + result2(split[2]) +
								'  ' +
								result3(split[2]) + '  ' + that.wuxian3 + '  ' + result4(split[2]),
							isLine: true,
							isRed: false
						})
						// that.listArr.push({
						// 	name: '    链路4',
						// 	value: '  ' + getOnOff(result1(split[3])) + '  ' + result2(split[3]) +
						// 		'  ' +
						// 		result3(split[3]) + '  ' + that.wuxian4 + '  ' + result4(split[3]),
						// 	isLine: true
						// })

					} else if (result.indexOf(getApp().globalData.writeMsg.ETH) != -1) {
						that.listArr.forEach((item, index) => {
							if (item.name != '设备编号' && item.name != '固件版本' && item.name != '工作模式' &&
								item
								.name != '水位测值' && item.name != '探头状态' &&
								item.name != '无线通信' && item.name != '    链路1' && item.name !=
								'    链路2' &&
								item.name != '    链路3' && item.name != '    链路4' && item.name != '中心站号') {
								that.listArr.splice(index, 1)
							}
						})
						var split = result.split(";")
						that.listArr.push({
							name: '有线通信',
							value: '',
							isLine: false,
							isRed: false
						})
						that.listArr.push({
							name: '    链路1',
							value: '  ' + getOnOff(result1(split[0])) + '  ' + result2(split[0]) +
								'  ' +
								result3(split[0]) + '  ' + that.youxian1,
							isLine: false,
							isRed: false
						})
						that.listArr.push({
							name: '    链路2',
							value: '  ' + getOnOff(result1(split[1])) + '  ' + result2(split[1]) +
								'  ' +
								result3(split[1]) + '  ' + that.youxian2,
							isLine: false,
							isRed: false
						})
						that.listArr.push({
							name: '    链路3',
							value: '  ' + getOnOff(result1(split[2])) + '  ' + result2(split[2]) +
								'  ' +
								result3(split[2]) + '  ' + that.youxian3,
							isLine: true,
							isRed: false
						})
					} else if (result.indexOf(getApp().globalData.writeMsg.WLL) != -1) {
						that.listArr.forEach((item, index) => {
							if (item.name != '设备编号' && item.name != '固件版本' && item.name != '工作模式' &&
								item
								.name != '水位测值' && item.name != '探头状态' &&
								item.name != '无线通信' && item.name != '    链路1' && item.name !=
								'    链路2' &&
								item.name != '    链路3' && item.name != '    链路4' &&
								item.name != '有线通信' && item.name != '    链路1' && item.name !=
								'    链路2' &&
								item.name != '    链路3' && item.name != '中心站号') {
								that.listArr.splice(index, 1)
							}
						})
						var split = result.split(";")

						that.wuxian1 = getTongXin(result1(split[0]))
						that.wuxian2 = getTongXin(result1(split[1]))
						that.wuxian3 = getTongXin(result1(split[2]))
						that.wuxian4 = getTongXin(result1(split[3]))
					} else if (result.indexOf(getApp().globalData.writeMsg.WDL) != -1) {
						that.listArr.forEach((item, index) => {
							if (item.name != '设备编号' && item.name != '固件版本' && item.name != '工作模式' &&
								item
								.name != '水位测值' && item.name != '探头状态' &&
								item.name != '无线通信' && item.name != '    链路1' && item.name !=
								'    链路2' &&
								item.name != '    链路3' && item.name != '    链路4' &&
								item.name != '有线通信' && item.name != '    链路1' && item.name !=
								'    链路2' &&
								item.name != '    链路3' && item.name != '中心站号') {
								that.listArr.splice(index, 1)
							}
						})
						var split = result.split(";")

						that.youxian1 = getTongXin(result1(split[0]))
						that.youxian2 = getTongXin(result1(split[1]))
						that.youxian3 = getTongXin(result1(split[2]))
					} else if (result.indexOf(getApp().globalData.writeMsg.MAC) != -1) {
						that.listArr.forEach((item, index) => {
							if (item.name != '设备编号' && item.name != '固件版本' && item.name != '工作模式' &&
								item
								.name != '水位测值' && item.name != '探头状态' &&
								item.name != '无线通信' && item.name != '    链路1' && item.name !=
								'    链路2' &&
								item.name != '    链路3' && item.name != '    链路4' &&
								item.name != '有线通信' && item.name != '    链路1' && item.name !=
								'    链路2' &&
								item.name != '    链路3' && item.name != '中心站号') {
								that.listArr.splice(index, 1)
							}
						})
						var split = result.split(";")
						that.listArr.push({
							name: '网卡参数',
							value: '',
							isLine: false,
							isRed: false
						})
						that.listArr.push({
							name: '    物理地址',
							value: split[0].split(",")[1],
							isLine: false,
							isRed: false
						})
						that.listArr.push({
							name: '    本机地址',
							value: split[1].split(",")[1],
							isLine: false,
							isRed: false
						})
						that.listArr.push({
							name: '    子网掩码',
							value: split[2].split(",")[1],
							isLine: false,
							isRed: false
						})
						that.listArr.push({
							name: '    默认网关',
							value: split[3].split(",")[1],
							isLine: true,
							isRed: false
						})

					} else if (result.indexOf(getApp().globalData.writeMsg.RTC) != -1) {
						that.listArr.forEach((item, index) => {
							if (item.name != '设备编号' && item.name != '固件版本' && item.name != '工作模式' &&
								item
								.name != '水位测值' && item.name != '探头状态' &&
								item.name != '无线通信' && item.name != '    链路1' && item.name !=
								'    链路2' &&
								item.name != '    链路3' && item.name != '    链路4' &&
								item.name != '有线通信' && item.name != '    链路1' && item.name !=
								'    链路2' &&
								item.name != '    链路3' &&
								item.name != '网卡参数' && item.name != '    物理地址' && item.name !=
								'    本机地址' && item.name != '    子网掩码' &&
								item.name != '    默认网关' && item.name != '中心站号') {
								that.listArr.splice(index, 1)
							}
						})
						that.listArr.push({
							name: '日期时间',
							value: result1(result) + '  ' + result2(result) + '  ' + getOnOff(result4(
								result)),
							isLine: true,
							isRed: false
						})
					} else if (result.indexOf(getApp().globalData.writeMsg.BAT) != -1) {
						that.listArr.forEach((item, index) => {
							if (item.name != '设备编号' && item.name != '固件版本' && item.name != '工作模式' &&
								item
								.name != '水位测值' && item.name != '探头状态' &&
								item.name != '无线通信' && item.name != '    链路1' && item.name !=
								'    链路2' &&
								item.name != '    链路3' && item.name != '    链路4' &&
								item.name != '有线通信' && item.name != '    链路1' && item.name !=
								'    链路2' &&
								item.name != '    链路3' &&
								item.name != '网卡参数' && item.name != '    物理地址' && item.name !=
								'    本机地址' && item.name != '    子网掩码' &&
								item.name != '    默认网关' && item.name != '日期时间' && item.name != '中心站号') {
								that.listArr.splice(index, 1)
							}
						})
						that.listArr.push({
							name: '供电电压',
							value: result1(result) + 'V',
							isLine: true,
							isRed: false
						})
					} else if (result.indexOf(getApp().globalData.writeMsg.TRH) != -1) {
						that.listArr.forEach((item, index) => {
							if (item.name != '设备编号' && item.name != '固件版本' && item.name != '工作模式' &&
								item
								.name != '水位测值' && item.name != '探头状态' &&
								item.name != '无线通信' && item.name != '    链路1' && item.name !=
								'    链路2' &&
								item.name != '    链路3' && item.name != '    链路4' &&
								item.name != '有线通信' && item.name != '    链路1' && item.name !=
								'    链路2' &&
								item.name != '    链路3' &&
								item.name != '网卡参数' && item.name != '    物理地址' && item.name !=
								'    本机地址' && item.name != '    子网掩码' &&
								item.name != '    默认网关' && item.name != '日期时间' && item.name != '供电电压' &&
								item.name != '中心站号'
							) {
								that.listArr.splice(index, 1)
							}
						})
						that.listArr.push({
							name: '温湿度值',
							value: result1(result) + '℃  ' + result2(result) + '%',
							isLine: true,
							isRed: false
						})
					} else if (result.indexOf(getApp().globalData.writeMsg.TSN) != -1) {
						that.listArr.forEach((item, index) => {
							if (item.name != '设备编号' && item.name != '固件版本' && item.name != '工作模式' &&
								item
								.name != '水位测值' && item.name != '探头状态' &&
								item.name != '无线通信' && item.name != '    链路1' && item.name !=
								'    链路2' &&
								item.name != '    链路3' && item.name != '    链路4' &&
								item.name != '有线通信' && item.name != '    链路1' && item.name !=
								'    链路2' &&
								item.name != '    链路3' &&
								item.name != '网卡参数' && item.name != '    物理地址' && item.name !=
								'    本机地址' && item.name != '    子网掩码' &&
								item.name != '    默认网关' && item.name != '日期时间' && item.name !=
								'供电电压' &&
								item.name != '温湿度值' && item.name != '中心站号') {
								that.listArr.splice(index, 1)
							}
						})
						that.listArr.push({
							name: '测站编号',
							value: result1(result),
							isLine: true,
							isRed: false
						})
					} else if (result.indexOf(getApp().globalData.writeMsg.WLR) != -1) {
						that.listArr.forEach((item, index) => {
							if (item.name != '设备编号' && item.name != '固件版本' && item.name != '工作模式' &&
								item
								.name != '水位测值' && item.name != '探头状态' &&
								item.name != '无线通信' && item.name != '    链路1' && item.name !=
								'    链路2' &&
								item.name != '    链路3' && item.name != '    链路4' &&
								item.name != '有线通信' && item.name != '    链路1' && item.name !=
								'    链路2' &&
								item.name != '    链路3' &&
								item.name != '网卡参数' && item.name != '    物理地址' && item.name !=
								'    本机地址' && item.name != '    子网掩码' &&
								item.name != '    默认网关' && item.name != '日期时间' && item.name !=
								'供电电压' &&
								item.name != '温湿度值' && item.name != '测站编号' && item.name != '中心站号') {
								that.listArr.splice(index, 1)
							}
						})
						that.listArr.push({
							name: '测站高程',
							value: result1(result) + '米',
							isLine: true,
							isRed: false
						})
					} else if (result.indexOf(getApp().globalData.writeMsg.WLC) != -1) {
						that.listArr.forEach((item, index) => {
							if (item.name != '设备编号' && item.name != '固件版本' && item.name != '工作模式' &&
								item
								.name != '水位测值' && item.name != '探头状态' &&
								item.name != '无线通信' && item.name != '    链路1' && item.name !=
								'    链路2' &&
								item.name != '    链路3' && item.name != '    链路4' &&
								item.name != '有线通信' && item.name != '    链路1' && item.name !=
								'    链路2' &&
								item.name != '    链路3' &&
								item.name != '网卡参数' && item.name != '    物理地址' && item.name !=
								'    本机地址' && item.name != '    子网掩码' &&
								item.name != '    默认网关' && item.name != '日期时间' && item.name !=
								'供电电压' &&
								item.name != '温湿度值' && item.name != '测站编号' &&
								item.name != '测站高程' && item.name != '中心站号') {
								that.listArr.splice(index, 1)
							}
						})
						that.listArr.push({
							name: '水位修正',
							value: result1(result) + "米",
							isLine: true,
							isRed: false
						})

					} else if (result.indexOf(getApp().globalData.writeMsg.DLV) != -1) {
						that.listArr.forEach((item, index) => {
							if (item.name != '设备编号' && item.name != '固件版本' && item.name != '工作模式' &&
								item
								.name != '水位测值' && item.name != '探头状态' &&
								item.name != '无线通信' && item.name != '    链路1' && item.name !=
								'    链路2' &&
								item.name != '    链路3' && item.name != '    链路4' &&
								item.name != '有线通信' && item.name != '    链路1' && item.name !=
								'    链路2' &&
								item.name != '    链路3' &&
								item.name != '网卡参数' && item.name != '    物理地址' && item.name !=
								'    本机地址' && item.name != '    子网掩码' &&
								item.name != '    默认网关' && item.name != '日期时间' && item.name !=
								'供电电压' &&
								item.name != '温湿度值' && item.name != '测站编号' &&
								item.name != '测站高程' && item.name != '水位修正' && item.name != '中心站号') {
								that.listArr.splice(index, 1)
							}
						})
						that.listArr.push({
							name: '测管长度',
							value: result1(result) + "米",
							isLine: true,
							isRed: false
						})

					} else if (result.indexOf(getApp().globalData.writeMsg.UMC) != -1) {
						that.listArr.forEach((item, index) => {
							if (item.name != '设备编号' && item.name != '固件版本' && item.name != '工作模式' &&
								item
								.name != '水位测值' && item.name != '探头状态' &&
								item.name != '无线通信' && item.name != '    链路1' && item.name !=
								'    链路2' &&
								item.name != '    链路3' && item.name != '    链路4' &&
								item.name != '有线通信' && item.name != '    链路1' && item.name !=
								'    链路2' &&
								item.name != '    链路3' &&
								item.name != '网卡参数' && item.name != '    物理地址' && item.name !=
								'    本机地址' && item.name != '    子网掩码' &&
								item.name != '    默认网关' && item.name != '日期时间' && item.name !=
								'供电电压' &&
								item.name != '温湿度值' && item.name != '测站编号' &&
								item.name != '测站高程' && item.name != '水位修正' && item.name != '测管长度' && item
								.name != '中心站号') {
								that.listArr.splice(index, 1)
							}
						})
						that.listArr.push({
							name: '自报周期',
							value: '',
							isLine: false,
							isRed: false
						})
						// that.listArr.push({
						// 	name: '    实时模式',
						// 	value: result2(result) + '秒',
						// 	isLine: false
						// })
						that.listArr.push({
							name: '    调试模式',
							value: result3(result) + '秒',
							isLine: false,
							isRed: false
						})
						that.listArr.push({
							name: '    正常模式',
							value: JSON.stringify(parseFloat(result1(result)) / 3600) + '小时',
							isLine: true,
							isRed: false
						})

					} else if (result.indexOf(getApp().globalData.writeMsg.AMT) != -1) {
						that.listArr.forEach((item, index) => {
							if (item.name != '设备编号' && item.name != '固件版本' && item.name != '工作模式' &&
								item
								.name != '水位测值' && item.name != '探头状态' &&
								item.name != '无线通信' && item.name != '    链路1' && item.name !=
								'    链路2' &&
								item.name != '    链路3' && item.name != '    链路4' &&
								item.name != '有线通信' && item.name != '    链路1' && item.name !=
								'    链路2' &&
								item.name != '    链路3' &&
								item.name != '网卡参数' && item.name != '    物理地址' && item.name !=
								'    本机地址' && item.name != '    子网掩码' &&
								item.name != '    默认网关' && item.name != '日期时间' && item.name !=
								'供电电压' &&
								item.name != '温湿度值' && item.name != '测站编号' &&
								item.name != '测站高程' && item.name != '水位修正' && item.name != '测管长度' &&
								item
								.name != '自报周期' && item.name != '    实时模式' &&
								item.name != '    调试模式' && item.name != '    正常模式' && item.name != '中心站号'
							) {
								that.listArr.splice(index, 1)
							}
						})
						that.listArr.push({
							name: '加报阈值',
							value: '',
							isLine: false,
							isRed: false
						})
						that.listArr.push({
							name: '    上传间隔',
							value: result1(result) + '分钟',
							isLine: false,
							isRed: false
						})
						that.listArr.push({
							name: '    变幅阈值',
							value: result2(result) + '毫米',
							isLine: false,
							isRed: false
						})
						that.listArr.push({
							name: '    水位阈值',
							value: result3(result) + '米',
							isLine: true,
							isRed: false
						})
					} else if (result.indexOf(getApp().globalData.writeMsg.BTC) != -1) {
						that.listArr.forEach((item, index) => {
							if (item.name != '设备编号' && item.name != '固件版本' && item.name != '工作模式' &&
								item
								.name != '水位测值' && item.name != '探头状态' &&
								item.name != '无线通信' && item.name != '    链路1' && item.name !=
								'    链路2' &&
								item.name != '    链路3' && item.name != '    链路4' &&
								item.name != '有线通信' && item.name != '    链路1' && item.name !=
								'    链路2' &&
								item.name != '    链路3' &&
								item.name != '网卡参数' && item.name != '    物理地址' && item.name !=
								'    本机地址' && item.name != '    子网掩码' &&
								item.name != '    默认网关' && item.name != '日期时间' && item.name !=
								'供电电压' &&
								item.name != '温湿度值' && item.name != '测站编号' &&
								item.name != '测站高程' && item.name != '水位修正' && item.name != '测管长度' &&
								item
								.name != '自报周期' && item.name != '    实时模式' &&
								item.name != '    调试模式' && item.name != '    正常模式' && item.name !=
								'加报阈值' && item.name != '    上传间隔' && item.name != '    变幅阈值' &&
								item.name != '    水位阈值' && item.name != '中心站号') {
								that.listArr.splice(index, 1)
							}
						})
						that.listArr.push({
							name: '心跳间隔',
							value: result1(result) + '秒',
							isLine: true,
							isRed: false
						})
					} else if (result.indexOf(getApp().globalData.writeMsg.CTC) != -1) {
						that.listArr.forEach((item, index) => {
							if (item.name != '设备编号' && item.name != '固件版本' && item.name != '工作模式' &&
								item
								.name != '水位测值' && item.name != '探头状态' &&
								item.name != '无线通信' && item.name != '    链路1' && item.name !=
								'    链路2' &&
								item.name != '    链路3' && item.name != '    链路4' &&
								item.name != '有线通信' && item.name != '    链路1' && item.name !=
								'    链路2' &&
								item.name != '    链路3' &&
								item.name != '网卡参数' && item.name != '    物理地址' && item.name !=
								'    本机地址' && item.name != '    子网掩码' &&
								item.name != '    默认网关' && item.name != '日期时间' && item.name !=
								'供电电压' &&
								item.name != '温湿度值' && item.name != '测站编号' &&
								item.name != '测站高程' && item.name != '水位修正' && item.name != '测管长度' &&
								item
								.name != '自报周期' && item.name != '    实时模式' &&
								item.name != '    调试模式' && item.name != '    正常模式' && item.name !=
								'加报阈值' && item.name != '    上传间隔' && item.name != '    变幅阈值' &&
								item.name != '    水位阈值' && item.name != '心跳间隔' &&
								item.name != '    心跳间隔' && item.name != '中心站号') {
								that.listArr.splice(index, 1)
							}
						})
						that.listArr.push({
							name: '自检周期',
							value: result1(result) + '月',
							isLine: true,
							isRed: false
						})

					} else if (result.indexOf(getApp().globalData.writeMsg.CSQ) != -1) {
						that.listArr.forEach((item, index) => {
							if (item.name != '设备编号' && item.name != '固件版本' && item.name != '工作模式' &&
								item
								.name != '水位测值' && item.name != '探头状态' &&
								item.name != '无线通信' && item.name != '    链路1' && item.name !=
								'    链路2' &&
								item.name != '    链路3' && item.name != '    链路4' &&
								item.name != '有线通信' && item.name != '    链路1' && item.name !=
								'    链路2' &&
								item.name != '    链路3' &&
								item.name != '网卡参数' && item.name != '    物理地址' && item.name !=
								'    本机地址' && item.name != '    子网掩码' &&
								item.name != '    默认网关' && item.name != '日期时间' && item.name !=
								'供电电压' &&
								item.name != '温湿度值' && item.name != '测站编号' &&
								item.name != '测站高程' && item.name != '水位修正' && item.name != '测管长度' &&
								item
								.name != '自报周期' && item.name != '    实时模式' &&
								item.name != '    调试模式' && item.name != '    正常模式' && item.name !=
								'加报阈值' && item.name != '    上传间隔' && item.name != '    变幅阈值' &&
								item.name != '    水位阈值' && item.name != '自检周期' && item.name != '心跳间隔' &&
								item.name != '    心跳间隔' && item.name != '中心站号') {
								that.listArr.splice(index, 1)
							}
						})
						that.listArr.push({
							name: '信号强度',
							value: result1(result) + '-dBm',
							isLine: true,
							isRed: false
						})
					} else if (result.indexOf(getApp().globalData.writeMsg.SIM) != -1) {
						that.listArr.forEach((item, index) => {
							if (item.name != '设备编号' && item.name != '固件版本' && item.name != '工作模式' &&
								item
								.name != '水位测值' && item.name != '探头状态' &&
								item.name != '无线通信' && item.name != '    链路1' && item.name !=
								'    链路2' &&
								item.name != '    链路3' && item.name != '    链路4' &&
								item.name != '有线通信' && item.name != '    链路1' && item.name !=
								'    链路2' &&
								item.name != '    链路3' &&
								item.name != '网卡参数' && item.name != '    物理地址' && item.name !=
								'    本机地址' && item.name != '    子网掩码' &&
								item.name != '    默认网关' && item.name != '日期时间' && item.name !=
								'供电电压' &&
								item.name != '温湿度值' && item.name != '测站编号' &&
								item.name != '测站高程' && item.name != '水位修正' && item.name != '测管长度' &&
								item
								.name != '自报周期' && item.name != '    实时模式' &&
								item.name != '    调试模式' && item.name != '    正常模式' && item.name !=
								'加报阈值' && item.name != '    上传间隔' && item.name != '    变幅阈值' &&
								item.name != '    水位阈值' && item.name != '自检周期' && item.name != '信号强度' &&
								item.name != '心跳间隔' &&
								item.name != '    心跳间隔' && item.name != '中心站号'
							) {
								that.listArr.splice(index, 1)
							}
						})
						that.listArr.push({
							name: 'SIM卡号',
							value: result1(result),
							isLine: true,
							isRed: false
						})
					} else if (result.indexOf(getApp().globalData.writeMsg.EXM) != -1) {
						that.listArr.forEach((item, index) => {
							if (item.name != '设备编号' && item.name != '固件版本' && item.name != '工作模式' &&
								item
								.name != '水位测值' && item.name != '探头状态' &&
								item.name != '无线通信' && item.name != '    链路1' && item.name !=
								'    链路2' &&
								item.name != '    链路3' && item.name != '    链路4' &&
								item.name != '有线通信' && item.name != '    链路1' && item.name !=
								'    链路2' &&
								item.name != '    链路3' &&
								item.name != '网卡参数' && item.name != '    物理地址' && item.name !=
								'    本机地址' && item.name != '    子网掩码' &&
								item.name != '    默认网关' && item.name != '日期时间' && item.name !=
								'供电电压' &&
								item.name != '温湿度值' && item.name != '测站编号' &&
								item.name != '测站高程' && item.name != '水位修正' && item.name != '测管长度' &&
								item
								.name != '自报周期' && item.name != '    实时模式' &&
								item.name != '    调试模式' && item.name != '    正常模式' && item.name !=
								'加报阈值' && item.name != '    上传间隔' && item.name != '    变幅阈值' &&
								item.name != '    水位阈值' && item.name != '自检周期' && item.name !=
								'信号强度' &&
								item.name != 'SIM卡号' && item.name != '心跳间隔' &&
								item.name != '    心跳间隔' && item.name != '中心站号') {
								that.listArr.splice(index, 1)
							}
						})
						let s = ''
						if (result1(result) == '0' || result1(result) == 'EF4015') {
							s = '正常'
						} else {
							s = '异常'
						}
						that.listArr.push({
							name: '数据存储',
							value: s,
							isLine: true,
							isRed: true
						})
					} else if (result.indexOf(getApp().globalData.writeMsg.SDS) != -1) {
						that.listArr.forEach((item, index) => {
							if (item.name != '设备编号' && item.name != '固件版本' && item.name != '工作模式' &&
								item
								.name != '水位测值' && item.name != '探头状态' &&
								item.name != '无线通信' && item.name != '    链路1' && item.name !=
								'    链路2' &&
								item.name != '    链路3' && item.name != '    链路4' &&
								item.name != '有线通信' && item.name != '    链路1' && item.name !=
								'    链路2' &&
								item.name != '    链路3' &&
								item.name != '网卡参数' && item.name != '    物理地址' && item.name !=
								'    本机地址' && item.name != '    子网掩码' &&
								item.name != '    默认网关' && item.name != '日期时间' && item.name !=
								'供电电压' &&
								item.name != '温湿度值' && item.name != '测站编号' &&
								item.name != '测站高程' && item.name != '水位修正' && item.name != '测管长度' &&
								item
								.name != '自报周期' && item.name != '    实时模式' &&
								item.name != '    调试模式' && item.name != '    正常模式' && item.name !=
								'加报阈值' && item.name != '    上传间隔' && item.name != '    变幅阈值' &&
								item.name != '    水位阈值' && item.name != '自检周期' && item.name !=
								'信号强度' &&
								item.name != 'SIM卡号' && item.name != '数据存储' && item.name != '心跳间隔' &&
								item.name != '    心跳间隔' && item.name != '中心站号') {
								that.listArr.splice(index, 1)
							}
						})

						that.listArr.forEach((item, index) => {

							switch (item.name) {
								case '数据存储':
									item.value = item.value + '  ' + result1(result)
									break;
								default:
									break;
							}
						})
					} else if (result.indexOf(getApp().globalData.writeMsg.DRA) != -1) {
						that.listArr.forEach((item, index) => {
							if (item.name != '设备编号' && item.name != '固件版本' && item.name != '工作模式' &&
								item
								.name != '水位测值' && item.name != '探头状态' &&
								item.name != '无线通信' && item.name != '    链路1' && item.name !=
								'    链路2' &&
								item.name != '    链路3' && item.name != '    链路4' &&
								item.name != '有线通信' && item.name != '    链路1' && item.name !=
								'    链路2' &&
								item.name != '    链路3' &&
								item.name != '网卡参数' && item.name != '    物理地址' && item.name !=
								'    本机地址' && item.name != '    子网掩码' &&
								item.name != '    默认网关' && item.name != '日期时间' && item.name !=
								'供电电压' &&
								item.name != '温湿度值' && item.name != '测站编号' &&
								item.name != '测站高程' && item.name != '水位修正' && item.name != '测管长度' &&
								item
								.name != '自报周期' && item.name != '    实时模式' &&
								item.name != '    调试模式' && item.name != '    正常模式' && item.name !=
								'加报阈值' && item.name != '    上传间隔' && item.name != '    变幅阈值' &&
								item.name != '    水位阈值' && item.name != '自检周期' && item.name !=
								'信号强度' &&
								item.name != 'SIM卡号' && item.name != '数据存储' && item.name != '心跳间隔' &&
								item.name != '    心跳间隔' && item.name != '中心站号') {
								that.listArr.splice(index, 1)
							}
						})
						that.listArr.push({
							name: '报警检测',
							value: '',
							isLine: false,
							isRed: false
						})

						that.listArr.push({
							name: '    箱门检测',
							value: '报警  ' + getOnOff(result1(result)),
							isLine: false,
							isRed: false
						})
					} else if (result.indexOf(getApp().globalData.writeMsg.DRS) != -1) {
						that.listArr.forEach((item, index) => {
							if (item.name != '设备编号' && item.name != '固件版本' && item.name != '工作模式' &&
								item
								.name != '水位测值' && item.name != '探头状态' &&
								item.name != '无线通信' && item.name != '    链路1' && item.name !=
								'    链路2' &&
								item.name != '    链路3' && item.name != '    链路4' &&
								item.name != '有线通信' && item.name != '    链路1' && item.name !=
								'    链路2' &&
								item.name != '    链路3' &&
								item.name != '网卡参数' && item.name != '    物理地址' && item.name !=
								'    本机地址' && item.name != '    子网掩码' &&
								item.name != '    默认网关' && item.name != '日期时间' && item.name !=
								'供电电压' &&
								item.name != '温湿度值' && item.name != '测站编号' &&
								item.name != '测站高程' && item.name != '水位修正' && item.name != '测管长度' &&
								item
								.name != '自报周期' && item.name != '    实时模式' &&
								item.name != '    调试模式' && item.name != '    正常模式' && item.name !=
								'加报阈值' && item.name != '    上传间隔' && item.name != '    变幅阈值' &&
								item.name != '    水位阈值' && item.name != '自检周期' && item.name !=
								'信号强度' &&
								item.name != 'SIM卡号' && item.name != '数据存储' &&
								item.name != '报警检测' && item.name != '    箱门检测' && item.name != '心跳间隔' &&
								item.name != '    心跳间隔' && item.name != '中心站号') {
								that.listArr.splice(index, 1)
							}
						})
						that.listArr.forEach((item, index) => {

							switch (item.name) {
								case '    箱门检测':
									item.value = item.value + '  ' + '状态  ' + getOnOff(result1(
										result))
									break;
								default:
									break;
							}
						})
					} else if (result.indexOf(getApp().globalData.writeMsg.SPA) != -1) {
						that.listArr.forEach((item, index) => {
							if (item.name != '设备编号' && item.name != '固件版本' && item.name != '工作模式' &&
								item
								.name != '水位测值' && item.name != '探头状态' &&
								item.name != '无线通信' && item.name != '    链路1' && item.name !=
								'    链路2' &&
								item.name != '    链路3' && item.name != '    链路4' &&
								item.name != '有线通信' && item.name != '    链路1' && item.name !=
								'    链路2' &&
								item.name != '    链路3' &&
								item.name != '网卡参数' && item.name != '    物理地址' && item.name !=
								'    本机地址' && item.name != '    子网掩码' &&
								item.name != '    默认网关' && item.name != '日期时间' && item.name !=
								'供电电压' &&
								item.name != '温湿度值' && item.name != '测站编号' &&
								item.name != '测站高程' && item.name != '水位修正' && item.name != '测管长度' &&
								item
								.name != '自报周期' && item.name != '    实时模式' &&
								item.name != '    调试模式' && item.name != '    正常模式' && item.name !=
								'加报阈值' && item.name != '    上传间隔' && item.name != '    变幅阈值' &&
								item.name != '    水位阈值' && item.name != '自检周期' && item.name !=
								'信号强度' &&
								item.name != 'SIM卡号' && item.name != '数据存储' &&
								item.name != '报警检测' && item.name != '    箱门检测' && item.name != '心跳间隔' &&
								item.name != '    心跳间隔' && item.name != '中心站号') {
								that.listArr.splice(index, 1)
							}
						})
						that.listArr.push({
							name: '    拆除检测',
							value: '报警  ' + getOnOff(result1(result)),
							isLine: false,
							isRed: false
						})
					} else if (result.indexOf(getApp().globalData.writeMsg.SPS) != -1) {
						that.listArr.forEach((item, index) => {
							if (item.name != '设备编号' && item.name != '固件版本' && item.name != '工作模式' &&
								item
								.name != '水位测值' && item.name != '探头状态' &&
								item.name != '无线通信' && item.name != '    链路1' && item.name !=
								'    链路2' &&
								item.name != '    链路3' && item.name != '    链路4' &&
								item.name != '有线通信' && item.name != '    链路1' && item.name !=
								'    链路2' &&
								item.name != '    链路3' &&
								item.name != '网卡参数' && item.name != '    物理地址' && item.name !=
								'    本机地址' && item.name != '    子网掩码' &&
								item.name != '    默认网关' && item.name != '日期时间' && item.name !=
								'供电电压' &&
								item.name != '温湿度值' && item.name != '测站编号' &&
								item.name != '测站高程' && item.name != '水位修正' && item.name != '测管长度' &&
								item
								.name != '自报周期' && item.name != '    实时模式' &&
								item.name != '    调试模式' && item.name != '    正常模式' && item.name !=
								'加报阈值' && item.name != '    上传间隔' && item.name != '    变幅阈值' &&
								item.name != '    水位阈值' && item.name != '自检周期' && item.name !=
								'信号强度' &&
								item.name != 'SIM卡号' && item.name != '数据存储' &&
								item.name != '报警检测' && item.name != '    箱门检测' && item.name !=
								'    拆除检测' && item.name != '心跳间隔' &&
								item.name != '    心跳间隔' && item.name != '中心站号'
							) {
								that.listArr.splice(index, 1)
							}
						})
						that.listArr.forEach((item, index) => {
							switch (item.name) {
								case '    拆除检测':
									item.value = item.value + '  ' + '状态  ' + getOnOff(result1(
										result))
									break;
								default:
									break;
							}
						})
					}
				})

				that.listArr.forEach((item, index) => {
					if (item.value.indexOf("undefined") != -1) {
						item.value = item.value.replaceAll("undefined", "")
					}
				})
			},

			SID() {
				let that = this
				var result = ''
				that.listArr = []
				that.resultList = []
				var timeout = 0
				uni.onBLECharacteristicValueChange((res) => {

					result = hexCharCodeToStr(ab2hex(res.value))
					console.log('查询蓝牙返回的数据SID()', result)
					that.resultList.push(result)
					// if (result.indexOf(getApp().globalData.writeMsg.SPS) != -1) {

					// 	// that.VER()
					// 	// EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.VER)
					// }
					that.getListArr()

				})

				// setTimeout(function() { 
				// 	if (result == '') {
				// 		console.log('setTimeout======================', result)
				// 		that.VER()
				// 		EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.VER)
				// 		timeout = that.time
				// 	}
				// }, that.time)
			},

			VER() {
				var that = this
				var result = ''
				var timeout = 0
				uni.onBLECharacteristicValueChange((res) => {

					result = hexCharCodeToStr(ab2hex(res.value))
					console.log('查询蓝牙返回的数据VER()', result)

					if (result.indexOf(getApp().globalData.writeMsg.VER) != -1) {
						that.resultList.push(result)
						that.MOD()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.MOD)
					}
				})

				setTimeout(function() {
					if (result == '') {
						that.MOD()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.MOD)
						timeout = that.time
					}
				}, that.time)
			},

			MOD() {
				var that = this
				var result = ''
				var timeout = 0
				uni.onBLECharacteristicValueChange((res) => {

					result = hexCharCodeToStr(ab2hex(res.value))
					console.log('查询蓝牙返回的数据MOD()', result)

					if (result.indexOf(getApp().globalData.writeMsg.MOD) != -1) {
						that.resultList.push(result)
						that.WLV()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.WLV)
					}

				})

				setTimeout(function() {
					if (result == '') {
						that.WLV()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.WLV)
						timeout = that.time
					}
				}, that.time)
			},

			WLV() {
				var that = this
				var result = ''
				var timeout = 0
				uni.onBLECharacteristicValueChange((res) => {
					result = hexCharCodeToStr(ab2hex(res.value))
					console.log('查询蓝牙返回的数据WLV()', result)
					if (result.indexOf(getApp().globalData.writeMsg.WLV) != -1) {
						that.resultList.push(result)
						that.SEN()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.SEN)
					}

				})

				setTimeout(function() {
					if (result == '') {
						that.SEN()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.SEN)
						timeout = that.time
					}
				}, that.time)
			},

			SEN() {
				var that = this
				var result = ''
				var timeout = 0
				uni.onBLECharacteristicValueChange((res) => {


					result = hexCharCodeToStr(ab2hex(res.value))
					console.log('查询蓝牙返回的数据SEN()', result)

					if (result.indexOf(getApp().globalData.writeMsg.SEN) != -1) {
						that.resultList.push(result)
						that.LTE()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.LTE)
					}

				})

				setTimeout(function() {
					if (result == '') {
						that.LTE()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.LTE)
						timeout = that.time
					}
				}, that.time)
			},

			LTE() {
				var that = this
				var result = ''
				var timeout = 0
				uni.onBLECharacteristicValueChange((res) => {


					result = hexCharCodeToStr(ab2hex(res.value))
					console.log('查询蓝牙返回的数据LTE()', result)

					if (result.indexOf(getApp().globalData.writeMsg.LTE) != -1) {
						that.resultList.push(result)
						that.ETH()
						//EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.ETH)
					}

				})

				setTimeout(function() {
					if (result == '') {
						that.ETH()
						//EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.ETH)
						timeout = that.time
					}
				}, that.time)
			},

			ETH() {
				var that = this
				var result = ''
				var timeout = 0
				uni.onBLECharacteristicValueChange((res) => {


					result = hexCharCodeToStr(ab2hex(res.value))
					console.log('查询蓝牙返回的数据ETH()', result)

					if (result.indexOf(getApp().globalData.writeMsg.ETH) != -1) {
						that.resultList.push(result)
						that.WLL()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.WLL)
					}

				})

				setTimeout(function() {
					if (result == '') {
						that.WLL()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.WLL)
						timeout = that.time
					}
				}, that.time)
			},

			WLL() {
				var that = this
				var result = ''
				var timeout = 0
				uni.onBLECharacteristicValueChange((res) => {


					result = hexCharCodeToStr(ab2hex(res.value))
					console.log('查询蓝牙返回的数据WLL()', result)

					if (result.indexOf(getApp().globalData.writeMsg.WLL) != -1) {
						that.resultList.push(result)
						that.WDL()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.WDL)
					}

				})

				setTimeout(function() {
					if (result == '') {
						that.WDL()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.WDL)
						timeout = that.time
					}
				}, that.time)
			},

			WDL() {
				var that = this
				var result = ''
				var timeout = 0
				uni.onBLECharacteristicValueChange((res) => {


					result = hexCharCodeToStr(ab2hex(res.value))
					console.log('查询蓝牙返回的数据WDL()', result)

					if (result.indexOf(getApp().globalData.writeMsg.WDL) != -1) {
						that.resultList.push(result)
						that.IPC()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.IPC)
					}

				})

				setTimeout(function() {
					if (result == '') {
						that.IPC()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.IPC)
						timeout = that.time
					}
				}, that.time)
			},

			IPC() {
				var that = this
				var result = ''
				var timeout = 0
				uni.onBLECharacteristicValueChange((res) => {


					result = hexCharCodeToStr(ab2hex(res.value))
					console.log('查询蓝牙返回的数据IPC()', result)

					if (result.indexOf(getApp().globalData.writeMsg.MAC) != -1) {
						that.resultList.push(result)
						that.RTC()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.RTC)
					}

				})

				setTimeout(function() {
					if (result == '') {
						that.RTC()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.RTC)
						timeout = that.time
					}
				}, that.time)
			},

			RTC() {
				var that = this
				var result = ''
				var timeout = 0
				uni.onBLECharacteristicValueChange((res) => {


					result = hexCharCodeToStr(ab2hex(res.value))
					console.log('查询蓝牙返回的数据RTC()', result)

					if (result.indexOf(getApp().globalData.writeMsg.RTC) != -1) {
						that.resultList.push(result)
						that.BAT()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.BAT)
					}

				})

				setTimeout(function() {
					if (result == '') {
						that.BAT()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.BAT)
						timeout = that.time
					}
				}, that.time)
			},

			BAT() {
				var that = this
				var result = ''
				var timeout = 0
				uni.onBLECharacteristicValueChange((res) => {


					result = hexCharCodeToStr(ab2hex(res.value))
					console.log('查询蓝牙返回的数据BAT()', result)

					if (result.indexOf(getApp().globalData.writeMsg.BAT) != -1) {
						that.resultList.push(result)
						that.TRH()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.TRH)
					}

				})

				setTimeout(function() {
					if (result == '') {
						that.TRH()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.TRH)
						timeout = that.time
					}
				}, that.time)
			},

			TRH() {
				var that = this
				var result = ''
				var timeout = 0
				uni.onBLECharacteristicValueChange((res) => {


					result = hexCharCodeToStr(ab2hex(res.value))
					console.log('查询蓝牙返回的数据TRH()', result)
					if (result.indexOf(getApp().globalData.writeMsg.TRH) != -1) {
						that.resultList.push(result)
						that.TSN()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.TSN)
					}

				})

				setTimeout(function() {
					if (result == '') {
						that.TSN()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.TSN)
						timeout = that.time
					}
				}, that.time)
			},

			TSN() {
				var that = this
				var result = ''
				var timeout = 0
				uni.onBLECharacteristicValueChange((res) => {

					result = hexCharCodeToStr(ab2hex(res.value))
					console.log('查询蓝牙返回的数据TSN()', result)

					if (result.indexOf(getApp().globalData.writeMsg.TSN) != -1) {
						that.resultList.push(result)
						that.WLR()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.WLR)
					}

				})

				setTimeout(function() {
					if (result == '') {
						that.WLR()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.WLR)
						timeout = that.time
					}
				}, that.time)
			},

			WLR() {
				var that = this
				var result = ''
				var timeout = 0
				uni.onBLECharacteristicValueChange((res) => {

					result = hexCharCodeToStr(ab2hex(res.value))
					console.log('查询蓝牙返回的数据WLR()', result)
					if (result.indexOf(getApp().globalData.writeMsg.WLR) != -1) {
						that.resultList.push(result)
						that.WLC()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.WLC)
					}

				})

				setTimeout(function() {
					if (result == '') {
						that.WLC()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.WLC)
						timeout = that.time
					}
				}, that.time)
			},

			WLC() {
				var that = this
				var result = ''
				var timeout = 0
				uni.onBLECharacteristicValueChange((res) => {

					result = hexCharCodeToStr(ab2hex(res.value))
					console.log('查询蓝牙返回的数据WLC()', result)
					if (result.indexOf(getApp().globalData.writeMsg.WLC) != -1) {
						that.resultList.push(result)
						that.DLV()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.DLV)
					}

				})

				setTimeout(function() {
					if (result == '') {
						that.DLV()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.DLV)
						timeout = that.time
					}
				}, that.time)
			},

			DLV() {
				var that = this
				var result = ''
				var timeout = 0
				uni.onBLECharacteristicValueChange((res) => {

					result = hexCharCodeToStr(ab2hex(res.value))
					console.log('查询蓝牙返回的数据DLV()', result)
					if (result.indexOf(getApp().globalData.writeMsg.DLV) != -1) {
						that.resultList.push(result)
						that.UMC()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.UMC)
					}

				})

				setTimeout(function() {
					if (result == '') {
						that.UMC()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.UMC)
						timeout = that.time
					}
				}, that.time)
			},

			UMC() {
				var that = this
				var result = ''
				var timeout = 0
				uni.onBLECharacteristicValueChange((res) => {

					result = hexCharCodeToStr(ab2hex(res.value))
					console.log('查询蓝牙返回的数据UMC()', result)
					if (result.indexOf(getApp().globalData.writeMsg.UMC) != -1) {
						that.resultList.push(result)
						that.AMT()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.AMT)
					}

				})

				setTimeout(function() {
					if (result == '') {
						that.AMT()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.AMT)
						timeout = that.time
					}
				}, that.time)
			},

			AMT() {
				var that = this
				var result = ''
				var timeout = 0
				uni.onBLECharacteristicValueChange((res) => {

					result = hexCharCodeToStr(ab2hex(res.value))
					console.log('查询蓝牙返回的数据AMT()', result)
					if (result.indexOf(getApp().globalData.writeMsg.AMT) != -1) {
						that.resultList.push(result)
						that.CTC()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.CTC)
					}

				})

				setTimeout(function() {
					if (result == '') {
						that.CTC()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.CTC)
						timeout = that.time
					}
				}, that.time)
			},

			CTC() {
				var that = this
				var result = ''
				var timeout = 0
				uni.onBLECharacteristicValueChange((res) => {

					result = hexCharCodeToStr(ab2hex(res.value))
					console.log('查询蓝牙返回的数据CTC()', result)
					if (result.indexOf(getApp().globalData.writeMsg.CTC) != -1) {
						that.resultList.push(result)
						that.CSQ()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.CSQ)
					}

				})

				setTimeout(function() {
					if (result == '') {
						that.CSQ()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.CSQ)
						timeout = that.time
					}
				}, that.time)
			},

			CSQ() {
				var that = this
				var result = ''
				var timeout = 0
				uni.onBLECharacteristicValueChange((res) => {

					result = hexCharCodeToStr(ab2hex(res.value))
					console.log('查询蓝牙返回的数据CSQ()', result)
					if (result.indexOf(getApp().globalData.writeMsg.CSQ) != -1) {
						that.resultList.push(result)
						that.SIM()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.SIM)
					}

				})

				setTimeout(function() {
					if (result == '') {
						that.SIM()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.SIM)
						timeout = that.time
					}
				}, that.time)
			},

			SIM() {
				var that = this
				var result = ''
				var timeout = 0
				uni.onBLECharacteristicValueChange((res) => {

					result = hexCharCodeToStr(ab2hex(res.value))
					console.log('查询蓝牙返回的数据SIM()', result)
					if (result.indexOf(getApp().globalData.writeMsg.SIM) != -1) {
						that.resultList.push(result)
						that.EXM()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.EXM)
					}

				})

				setTimeout(function() {
					if (result == '') {
						that.EXM()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.EXM)
						timeout = that.time
					}
				}, that.time)
			},

			EXM() {
				var that = this
				var result = ''
				var timeout = 0
				uni.onBLECharacteristicValueChange((res) => {

					result = hexCharCodeToStr(ab2hex(res.value))
					console.log('查询蓝牙返回的数据EXM()', result)
					if (result.indexOf(getApp().globalData.writeMsg.EXM) != -1) {
						that.resultList.push(result)
						that.SDS()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.SDS)
					}

				})

				setTimeout(function() {
					if (result == '') {
						that.SDS()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.SDS)
						timeout = that.time
					}
				}, that.time)
			},

			SDS() {
				var that = this
				var result = ''
				var timeout = 0
				uni.onBLECharacteristicValueChange((res) => {

					result = hexCharCodeToStr(ab2hex(res.value))
					console.log('查询蓝牙返回的数据SDS()', result)
					if (result.indexOf(getApp().globalData.writeMsg.SDS) != -1) {
						that.resultList.push(result)
						that.DRA()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.DRA)
					}

				})

				setTimeout(function() {
					if (result == '') {
						that.DRA()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.DRA)
						timeout = that.time
					}
				}, that.time)
			},

			DRA() {
				var that = this
				var result = ''
				var timeout = 0
				uni.onBLECharacteristicValueChange((res) => {

					result = hexCharCodeToStr(ab2hex(res.value))
					console.log('查询蓝牙返回的数据DRA()', result)
					if (result.indexOf(getApp().globalData.writeMsg.DRA) != -1) {
						that.resultList.push(result)
						that.DRS()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.DRS)
					}

				})

				setTimeout(function() {
					if (result == '') {
						that.DRS()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.DRS)
						timeout = that.time
					}
				}, that.time)
			},

			DRS() {
				var that = this
				var result = ''
				var timeout = 0
				uni.onBLECharacteristicValueChange((res) => {

					result = hexCharCodeToStr(ab2hex(res.value))
					console.log('查询蓝牙返回的数据DRS()', result)
					if (result.indexOf(getApp().globalData.writeMsg.DRS) != -1) {
						that.resultList.push(result)
						that.SPA()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.SPA)
					}

				})

				setTimeout(function() {
					if (result == '') {
						that.SPA()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.SPA)
						timeout = that.time
					}
				}, that.time)
			},

			SPA() {
				var that = this
				var result = ''
				var timeout = 0
				uni.onBLECharacteristicValueChange((res) => {

					result = hexCharCodeToStr(ab2hex(res.value))
					console.log('查询蓝牙返回的数据SPA()', result)
					if (result.indexOf(getApp().globalData.writeMsg.SPA) != -1) {
						that.resultList.push(result)
						that.SPS()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.SPS)
					}

				})

				setTimeout(function() {
					if (result == '') {
						that.SPS()
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.SPS)
						timeout = that.time
					}
				}, that.time)
			},

			SPS() {
				var that = this
				var result = ''
				var timeout = 0
				uni.onBLECharacteristicValueChange((res) => {

					result = hexCharCodeToStr(ab2hex(res.value))
					console.log('查询蓝牙返回的数据SPS()', result)
					if (result.indexOf(getApp().globalData.writeMsg.SPS) != -1) {
						that.resultList.push(result)
					}
				})

				that.getListArr()
				setTimeout(function() {
					if (result == '') {
						timeout = that.time
					}
				}, that.time)
				console.log('00000000000', that.resultList)
			},
		}
	}
</script>

<style lang="scss">
	.btn-primary {
		width: 55px;
		height: 35px;
		position: fixed;
		right: 0%;
		bottom: 88px;
		background-color: green;
		color: #fff;
		font-size: 12px;
		display: flex;
		align-items: center;
		justify-content: center;
	}


	.block {
		position: fixed;
		left: 0;
		top: 0;
		right: 0;
		bottom: 0;
		/* #ifndef APP-NVUE */
		display: flex;
		/* #endif */
		justify-content: center;
		align-items: center;
		background-color: #fff;

	}


	.l-content {
		width: 80%;
		height: 85%;
		border: 1px solid gray;
		border-radius: 20px;
		background-color: white;
		padding-left: 15px;
		padding-top: 10px;
		padding-right: 10px;
		padding-bottom: 10px;
		/* margin-bottom: 140upx; */
		display: flex;
		flex-direction: column;
	}

	.value {
		display: flex;
		font-size: 12.5px;
		margin-left: 15px;
		white-space: pre-wrap;
	}
</style>